# $Id: PKGBUILD 64690 2012-02-17 18:39:32Z bluewind $
# Maintainer: Florian Pritz <flo@xinu.at>

pkgname=perl-rename
pkgver=1.8
pkgrel=2
pkgdesc="Renames multiple files using Perl regular expressions."
arch=(any)
url="http://search.cpan.org/~pederst/rename/"
license=('custom')
depends=(perl)
options=(!emptydirs)
source=(http://search.cpan.org/CPAN/authors/id/P/PE/PEDERST/rename-$pkgver.tar.gz)
md5sums=('5e78d1ebce74b09de81bd451176c7f83')

build() {
    cd "$srcdir/rename-$pkgver"

    perl Makefile.PL PREFIX=/usr INSTALLDIRS=vendor
    make
}

package() {
    cd "$srcdir/rename-$pkgver"

    make DESTDIR="$pkgdir/" install
    install -d "$pkgdir/usr/bin/"
    ln -s vendor_perl/rename "$pkgdir/usr/bin/perl-rename"
    ln -s /usr/share/man/man1/rename.1p.gz "$pkgdir/usr/share/man/man1/perl-rename.1p.gz"
}
